package com.ly.heart.service.impl;

import java.util.List;
import com.ly.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ly.heart.mapper.ProjectQualityDetailEntityMapper;
import com.ly.heart.domain.ProjectQualityDetailEntity;
import com.ly.heart.service.IProjectQualityDetailEntityService;

/**
 * 项目质量整改清单Service业务层处理
 *
 * @author cxl
 * @date 2024-05-14
 */
@Service
public class ProjectQualityDetailEntityServiceImpl implements IProjectQualityDetailEntityService
{
    @Autowired
    private ProjectQualityDetailEntityMapper projectQualityDetailEntityMapper;

    /**
     * 查询项目质量整改清单
     *
     * @param id 项目质量整改清单主键
     * @return 项目质量整改清单
     */
    @Override
    public ProjectQualityDetailEntity selectProjectQualityDetailEntityById(String id)
    {
        return projectQualityDetailEntityMapper.selectProjectQualityDetailEntityById(id);
    }

    /**
     * 查询项目质量整改清单列表
     *
     * @param projectQualityDetailEntity 项目质量整改清单
     * @return 项目质量整改清单
     */
    @Override
    public List<ProjectQualityDetailEntity> selectProjectQualityDetailEntityList(ProjectQualityDetailEntity projectQualityDetailEntity)
    {
        return projectQualityDetailEntityMapper.selectProjectQualityDetailEntityList(projectQualityDetailEntity);
    }

    /**
     * 新增项目质量整改清单
     *
     * @param projectQualityDetailEntity 项目质量整改清单
     * @return 结果
     */
    @Override
    public int insertProjectQualityDetailEntity(ProjectQualityDetailEntity projectQualityDetailEntity)
    {
        projectQualityDetailEntity.setCreateTime(DateUtils.getNowDate());
        return projectQualityDetailEntityMapper.insertProjectQualityDetailEntity(projectQualityDetailEntity);
    }

    /**
     * 修改项目质量整改清单
     *
     * @param projectQualityDetailEntity 项目质量整改清单
     * @return 结果
     */
    @Override
    public int updateProjectQualityDetailEntity(ProjectQualityDetailEntity projectQualityDetailEntity)
    {
        return projectQualityDetailEntityMapper.updateProjectQualityDetailEntity(projectQualityDetailEntity);
    }

    /**
     * 批量删除项目质量整改清单
     *
     * @param ids 需要删除的项目质量整改清单主键
     * @return 结果
     */
    @Override
    public int deleteProjectQualityDetailEntityByIds(String[] ids)
    {
        return projectQualityDetailEntityMapper.deleteProjectQualityDetailEntityByIds(ids);
    }

    /**
     * 删除项目质量整改清单信息
     *
     * @param id 项目质量整改清单主键
     * @return 结果
     */
    @Override
    public int deleteProjectQualityDetailEntityById(String id)
    {
        return projectQualityDetailEntityMapper.deleteProjectQualityDetailEntityById(id);
    }
}
